package com.training.java.core.collections.post15.Set.Laptop;

import java.util.HashSet;
import java.util.Set;

public class LaptopSetDemo {

	public static void main(String[] args) {
		Laptop laptop1 = new Laptop("hp", "a200", "windows7");

		Laptop laptop2 = new Laptop("sony", "b2000", "windows8");

		Laptop laptop3 = new Laptop("sony", "b2000", "windowsxp");

		Laptop laptop4 = new Laptop("hp", "ac333", "windows 7");

		Laptop laptop5 = new Laptop("hp", "ac333", "windows xp");

		Set<Laptop> laptops = new HashSet<Laptop>();
		laptops.add(laptop1);
		laptops.add(laptop2);
		laptops.add(laptop3);
		laptops.add(laptop4);
		laptops.add(laptop5);

		for (Laptop aLaptop : laptops) {

			System.out.println("Company = " + aLaptop.getCompany());
			System.out.println("Model = " + aLaptop.getModel());
			System.out.println("OS = " + aLaptop.getOperatingSystem());
		}

	}

}
